package com.breakfast.fun.data.entity.home;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/18.
 */
public class FourAd {

    /**
     * id : 43
     * cityId : 1
     * title : 每日签到
     * picture : http://m.52letsgo.cn/ad_img/12/12/7d24c24f-a_-1330119856.png
     * sort : 0
     * info : 每日签到
     * linkId : 0
     * pageCode : meiriqiandao
     * positionLable : fourad
     * typeLable : adpage
     * state : 0
     * addTime : 2016-06-17 23:43:42
     */

    private int id;
    private int cityId;
    private String title;
    private String picture;
    private int sort;
    private String info;
    private int linkId;
    private String pageCode;
    private String positionLable;
    private String typeLable;
    private int state;
    private String addTime;
    private String linkUrl;

    public static FourAd objectFromData(String str) {

        return new Gson().fromJson(str, FourAd.class);
    }

    public static List<FourAd> arrayFourAdFromData(String str) {

        Type listType = new TypeToken<ArrayList<FourAd>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public int getLinkId() {
        return linkId;
    }

    public void setLinkId(int linkId) {
        this.linkId = linkId;
    }

    public String getPageCode() {
        return pageCode;
    }

    public void setPageCode(String pageCode) {
        this.pageCode = pageCode;
    }

    public String getPositionLable() {
        return positionLable;
    }

    public void setPositionLable(String positionLable) {
        this.positionLable = positionLable;
    }

    public String getTypeLable() {
        return typeLable;
    }

    public void setTypeLable(String typeLable) {
        this.typeLable = typeLable;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }
}
